using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class FrmAddOrder_WithoutPageMethods : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    int customerID;
    string productID;
    string tmp;

    tmp = Request.QueryString["CustomerID"];
    if (tmp == null)
      throw new Exception("CustomerID parameter is missing.");
    try
    {
      customerID = Int32.Parse(tmp);
    }
    catch (FormatException)
    {
      throw new Exception("Parameter CustomerID is not in a valid format.");
    }
    productID = Request.QueryString["ProductID"];
    if (productID == null)
      throw new Exception("productID parameter is missing.");

    // Real page processing starts here
    // ...
    Label1.Text = String.Format("Ready to add an order of product {0} for customer {1}.",
      productID, customerID);
  }
}
